// @ts-ignore
/* eslint-disable */
import request from "@/request";

/** 此处后端没有提供注释 POST /cart/add/${param0} */
export async function addCartProducts(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.addCartProductsParams,
  options?: { [key: string]: any }
) {
  const { productId: param0, ...queryParams } = params;
  return request<API.BaseResponseBoolean>(`/cart/add/${param0}`, {
    method: "POST",
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 POST /cart/delete/${param0} */
export async function deleteCartProducts(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.deleteCartProductsParams,
  options?: { [key: string]: any }
) {
  const { productId: param0, ...queryParams } = params;
  return request<API.BaseResponseBoolean>(`/cart/delete/${param0}`, {
    method: "POST",
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 POST /cart/get/list */
export async function listCartVoByPage(options?: { [key: string]: any }) {
  return request<API.BaseResponseListProductsVO>("/cart/get/list", {
    method: "POST",
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 POST /cart/payCart */
export async function payTheCart(options?: { [key: string]: any }) {
  return request<API.BaseResponseBoolean>("/cart/payCart", {
    method: "POST",
    ...(options || {}),
  });
}
